/*
 * Copyright 2022-2029 heshuixing(https://gitee.com/heshuixing)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mercury.ec.framework.air.core.client.impl.sunstn.dto.xsfsi;

import com.mercury.ec.framework.air.core.client.impl.sunstn.jaxb.adapter.Boolean2XmlAdapter;
import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.math.BigDecimal;

/**
 * XSFSI Response DTO
 *
 * @author hesx
 */
@Data
@XmlRootElement(name = "cmd")
@XmlAccessorType(XmlAccessType.FIELD)
public class SunstnXsfsiRespDTO {
    /**
     * 操作结果，如果为 0，则表示该次请求失败，失败原因以文本表示
     */
    @XmlAttribute(name = "ret_value")
    @XmlJavaTypeAdapter(Boolean2XmlAdapter.class)
    private Boolean ret_value;

    /**
     * 错语信息
     */
    @XmlAttribute(name = "err_info")
    private String err_info;

    /**
     * 是否有多个票价基础
     */
    @XmlJavaTypeAdapter(Boolean2XmlAdapter.class)
    private Boolean multifarebasis;

    /**
     * 最低票价的票价基础
     */
    private String farebasis;

    /**
     * 票价
     */
    private BigDecimal cnyf;

    /**
     * 税费
     */
    private BigDecimal cnytax;

    /**
     * Q 项计算出的 Q 值（KE EY EK HX UO 有效）
     */
    private BigDecimal cnyqtax;

    /**
     * 总价格（票面+税费）
     */
    private BigDecimal cnytotal;

    /**
     * OPEN 票的最小停留时间
     */
    private Integer minstay;
}
